<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>正方体</title>
    <style type="text/css">
        .cube{
            width: 500px;
            height: 500px;
            border: solid 1px red;
            margin:60px 50px;
            position: absolute;
            transform-style: preserve-3d;
            transform: rotateX(-30deg) rotateY(30deg);
        }
        .cube .surface{
            position: absolute;
            width: 120px;
            height: 120px;
            border: 1px #ccc solid;
            background: rgba(255,255,255,0.7);
            box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
            line-height: 120px;
            text-align: center;
            font-size: 100px;
        }
        .cube .surface1{
            transform: translateZ(60px);
        }
        .cube .surface2{
            transform:rotateY(90deg) translateZ(60px);
        }
        .cube .surface3{
            transform:rotateX(90deg) translateZ(60px);
        }
        .cube .surface4{
            transform:rotateY(-180deg) translateZ(60px);
        }
        .cube .surface5{
            transform:rotateY(-90deg) translateZ(60px);
        }
        .cube .surface6{
            transform:rotateX(90deg) translateZ(-60px);
        }
    </style>
</head>
<body>
<div class="cube">
    <div class="surface surface1">1</div>
    <div class="surface surface2">2</div>
    <div class="surface surface3">3</div>
    <div class="surface surface4">4</div>
    <div class="surface surface5">5</div>
    <div class="surface surface6">6</div>
</div>
</body>
</html>